package org.sny7.openOfflineList.listener;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import org.sny7.openOfflineList.bean.Game;
import org.sny7.openOfflineList.gui.GameList;

public class GameListItemClick extends MouseAdapter {
	
	public void mouseClicked(MouseEvent e) {
		if (e.getClickCount() == 1) {
			GameList list = (GameList) e.getSource();
			int index = list.locationToIndex(e.getPoint());
			Game game = (Game) list.getModel().getElementAt(index);
			System.out.println(game.getReleaseNumber());
		}
	}

}
